package com.breadenglish.cms.api.app.gateway.model;

import com.breadenglish.cms.api.app.gateway.util.CustomTimeSerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jsondoc.core.annotation.ApiObject;
import org.jsondoc.core.annotation.ApiObjectField;

import java.util.Date;

/**
 * Created by jiangkun on 15/12/21.
 */
@ApiObject
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public class BeVipChatLog {
    @ApiObjectField(description = "ID")
    private int id;

    @ApiObjectField(description = "记录类型,voice:语音内容(MessageVoice),picture:图片url,text:文字",required = true)
    private String type;

    @ApiObjectField(description = "文字内容,如果是图片则为url")
    private String content;

    @ApiObjectField(description = "语音内容")
    private MessageVoice voice;

    @ApiObjectField(description = "信息来源,me:学员发送,teacher:老师发送",required = true)
    private String from;

    @ApiObjectField(description = "日期时间")
    @JsonSerialize(using = CustomTimeSerializer.class)
    private Date dt;

    public BeVipChatLog() {
    }

    public BeVipChatLog(int id, String type, String content, MessageVoice voice, String from, Date dt) {
        this.id = id;
        this.type = type;
        this.content = content;
        this.voice = voice;
        this.from = from;
        this.dt = dt;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public MessageVoice getVoice() {
        return voice;
    }

    public void setVoice(MessageVoice voice) {
        this.voice = voice;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public Date getDt() {
        return dt;
    }

    public void setDt(Date dt) {
        this.dt = dt;
    }
}
